import request from '@/config/axios'
import { WithdrawalConfig } from './types'

/**
 * 提现配置详情
 * @param withdrawalUserType 提现用户类型(1-商户，2-经纪人)
 */
export const withdrawalConfigDetailsApi = (withdrawalUserType, financialAccountType) => {
  return request.get<WithdrawalConfig>({
    url: `/withdrawalConfig/details?withdrawalUserType=${withdrawalUserType}&financialAccountType=${financialAccountType}`
  })
}

// 保存提现配置
export const withdrawalConfigSaveApi = (data: WithdrawalConfig) => {
  return request.post({ url: '/withdrawalConfig/save', data })
}
